<template>
<div class="header">
      <ul class="items">
          <li class="item left">
              <p><img class="icon" v-on:click="go_back" src=""></p>
          </li>
          <li class="item right">
             <p class="text" v-if="msg">{{msg}}</p>
          </li>
      </ul>
  </div>


   
 
                
                

</template>

<script>
export default {
    name: "HeaderWithBack",
    props: ['msg'],
    template: '#template-back-header',
    methods: {
        go_back: function () {
            window.history.back();
        }
    }
};
</script>

<style scoped>
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 50px;
    background-color: #b93221;
}

.items {
    width: 100%;
    height: 100%;
}

.item {
    line-height: 50px;
    height: 50px;
    margin: 0 1em;
}

.left {
     float: left;
}

.right {
    width: 40%;
    float: right;
    overflow-x: auto;
    text-align: right;
    white-space: nowrap;
    text-overflow: ellipsis;

}

.icon {
    width: 1rem;
}

.text {
    font-size: 1rem;
    font-weight: lighter;
    color: #fffffd;
}
</style>
